define(["jquery"], function ($) {
    function Ajax() {
    }

    Ajax.Option = {
        options: {},
        url: null,
        type: {},
        beforeSend: {},
        async: false,
        cache: true,
        dataType: {},
        contentType: {},
        context: {},
        data: {},
        dataFilter: {},
        success: {},
        error: {},
        complete: {},
        global: {},
        ifModified: false,
        jsonp: null,
        jsonpCallback: null,
        username: null,
        password: null,
        processData: true,
        scriptCharset: null,
        traditional: false,
        timeout: 0,
        xhr: null
    };

    Ajax.DataType = {
        String: "String",
        xml: "xml",
        html: "html",
        script: "script",
        json: "json",
        jsonp: "jsonp",
        text: "text",
        unspecified: "unspecified"
    };

    Ajax.RequestType = {POST: "POST", GET: "GET", PUT: "PUT", DELETE: "DELETE"};

    Ajax.post = function (option) {
        option.type = Ajax.RequestType.POST;
        $.ajax(option);
    };

    Ajax.asyncPost = function (option) {
        option.type = Ajax.RequestType.POST;
        option.async = true;
        $.ajax(option);
    };

    Ajax.get = function (option) {
        option.type = Ajax.RequestType.GET;
        $.ajax(option);
    };

    Ajax.asyncGet = function (option) {
        option.type = Ajax.RequestType.GET;
        option.async = true;
        $.ajax(option);
    };
    return Ajax;
});